<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件语法糖</title>
</head>
<body>
<div id="app">
    <cpn></cpn>
</div>

<script type="module">
    import {createApp, defineComponent} from "../../../../js/vue.esm-browser.js";

    let cpn = defineComponent(
        {
            template: "<h1>Hello, World!</h1>"
        }
    );

    let app = createApp({
        setup() {
            return {}
        }
    })


    // app.component("cpn", cpn)
    app.component(
        "cpn",
        {
            template: "<h1>Hello, World!</h1>"
        }
    )

    app.mount("#app")
</script>
</body>
</html>